package main
import "fmt"

const(
    WHITE = iota
    BLACK
    BLUE
    RED
    YELLOW
)

type Color byte

type Box struct {
    width,height,depth float64
    color Color
}

type BoxList []Box //a slice of boxes

func (b Box) Volume() float64 {
    return b.width*b.height*b.depth
}

func (b *Box) SetColor(c Color){
    b.color = c
}

func (bl BoxList) BiggestsColor() Color{
    v := 0
    k := Color(WHITE)
    for _,b := range bl{
        if b.Volume() > v{
            v = b.Volume
            k = b.color
        }
    }
    return k
}

func (bl BoxList) PaintltBlack(){
    for i,_ := range bl{
        bl[i].SetColor(BLACK)
    }
}


